<title><#if roomPager??>编辑<#else>新增</#if>房间</title>
<link type="text/css" href="${ctx}/resources/css/demo.css"  rel="stylesheet" />
<link type="text/css" href="${ctx}/resources/css/easyui.css"  rel="stylesheet" />
<script type="text/javascript" src="${ctx}/resources/js/jquery.easyui.min.js"></script>
<script>

</script>
<div class="page-header">
	<h1>
		<#if pager??>编辑<#else>新增</#if>房间
		<small>
			<i class="icon-double-angle-right"></i>
		</small>
	</h1>
</div>
<form class="form-horizontal" role="form" id="validation-form" method="POST" action="${ctx}/admin/room/dosave${suffix}" enctype="multipart/form-data">
<#if pager??>
	<input type="hidden" name="id" value="${pager.id}"/>
</#if>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="roomZ">幢号:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-20">
			
				<#if pager??>
					<input type="text" name="roomZ" value="${pager.roomZ!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="roomZ" value="" class="form-control" placeholder=""/>
				</#if>
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="roomDy">单元号:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-20">
			
				<#if pager??>
					<input type="text" name="roomDy" value="${pager.roomDy!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="roomDy" value="" class="form-control" placeholder=""/>
				</#if>
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<label class="control-label col-xs-12 col-sm-3 no-padding-right" for="roomNo">房号:</label>
	<div class="col-xs-12 col-sm-9">
		<div class="clearfix">
			<span class="block input-icon width-20">
			
				<#if pager??>
					<input type="text" name="roomNo" value="${pager.roomNo!}" class="form-control" placeholder=""/>
				<#else>
					<input type="text" name="roomNo" value="" class="form-control" placeholder=""/>
				</#if>
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<div class="col-md-offset-3 col-md-9">
		<button class="btn btn-info" type="submit"><i class="icon-ok bigger-110"></i>提  交</button>
		&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
		<button class="btn" type="reset"><i class="icon-undo bigger-110"></i>重  置</button>
	</div>
</div>

</fieldset>
</form>
<#if errorMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer red"></i>
		<span class="pink">${errorMsg}
		</span>
	</h4>
</#if>
<script>
var country = Object.create(B.Country);
$(document).ready(function(){
	RP.addBreadcrumb([{name:"基础"}, {name:"<#if pager??>编辑<#else>新增</#if>房间",  active: true}]);
	$('#id-input-file-1').ace_file_input({
		no_file:'没文件 ...',
		btn_choose:'请选择文件',
		btn_change:'重新选择文件',
		droppable:false,
		onchange:null,
		thumbnail:false
	});
	country.regist4Select(${(villagePager.cityCode)!-1},"provinceSelect","citySelect");
	$("#countySelect").hide();
	$('#validation-form').validate({
		errorElement: 'div',
		errorClass: 'help-block',
		focusInvalid: true,
		rules: {
			roomZ:{
				required:true,
				maxlength: 4
			},
			roomDy:{
				required:true
			},
			roomNo:{
				required:true,
				number:true,
				maxlength: 4
			}
		},
	
		messages: {

		},
	
		invalidHandler: function (event, validator) { //display error alert on form submit   
			RP.Form.invalidHandler(event, validator);
		},
	
		highlight: function (e) {
			RP.Form.highlight(e);
		},
		
		errorPlacement: function (error, element) {
			RP.Form.errorPlacement(error, element);	
		},
	
		success: function (e) {
			RP.Form.success(e);	
		},
		
		submitHandler: function(form) {
			RP.Form.submitHandler(form);
		}
	});
});
</script>